package cn.edu.gench.learn.day5;

import sun.nio.cs.US_ASCII;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/4/7.
 */
public class ArrayListObject {

    public static void main(String[] args) {
        ArrayList<Users> arrayList = new ArrayList<Users>();
        Users user = new Users();
        user.setAge(31);
        user.setUsername("朱中标");

        Users user2 = new Users();
        user2.setAge(22);
        user2.setUsername("曹自强");

        arrayList.add(user);
        arrayList.add(user2);


        for (Object obj:arrayList){
            System.out.println(":"+obj);
        }


    }

}
